<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 
        应客户需求，需要设计一个求圆的面积的程序，方便客户使用
        求圆的周长.
     -->
    <script>
        
        function calCircleArea() {
            var r = 30;
            var area = Math.PI * r * r;
            console.log('area:' + area);
        }
        
        function calCircleLen() {
            var r = 30;
            var len = 2 * Math.PI * r;
            console.log('len:' + len);
        }

        calCircleArea();
        calCircleLen();
    </script>
</body>
</html>